package com.third.service.impl;

import com.third.entity.Perms;
import com.third.entity.Role;
import com.third.entity.User;
import com.third.service.UserService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

@Service
public class UserServiceimpl implements UserService {

    @Override
    public User findByAccount(String account) {

        List<Perms> perms = Arrays.asList(
                new Perms(3001,"goods:add"),
                new Perms(3002,"goods:del"),
                new Perms(3003,"goods:update")
        );
        List<Role> roles = Arrays.asList(
                new Role(2001,"admin",perms)
        );

        return new User(1001,"zhangsan","123",roles);
    }
}
